import { axios } from '@/utils/request'

export function edit (id) {
  if (id) {
    return (data) => axios({
      url: '/admin/leave/type/edit/' + id,
      method: 'post',
      data
    })
  } else {
    return (data) => axios({
      url: '/admin/leave/type/add',
      method: 'post',
      data
    })
  }
}
export function del (id) {
  return axios({
    url: '/admin/leave/type/remove/' + id,
    method: 'post'
  })
}
